package com.example.trackcircuitdiagnosis.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.trackcircuitdiagnosis.entity.DataEntity;
import com.example.trackcircuitdiagnosis.vo.DataVo;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface DataMapper extends BaseMapper<DataEntity> {

    @Select({"SELECT data.data_time, data.area_id, data_analog.* FROM data LEFT JOIN data_analog ON data_analog.data_id = data.data_id"})
    List<DataVo> selectByFaultId();
}
